package com.dong.order.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author DJ
 * @description
 * @date 2022/1/2 10:30 下午
 **/
@RestController
public class OrderConsumerController {
    public static final String INVOKE_URL = "http://cloud-provider-payment9003/";
    @Resource
    RestTemplate restTemplate;

    @GetMapping("consumer/payment/zk")
    public String PaymentInfo() {
        return restTemplate.getForObject(INVOKE_URL + "payment/zk/get-server-port", String.class);
    }
}
